import java.util.Scanner;
public class Exercise48 {
    public static void main(String[] args) {
        int count = 0;
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入一个被除数：");
        int dividend = sc.nextInt();
        System.out.println("请输入一个除数：");
        int divisor = sc.nextInt();
        while(dividend >= divisor){
            dividend = dividend - divisor;
            count++;
        }
        System.out.println("请输入余数：" + dividend);
        System.out.println("请输入商：" + count);
    }


}
